<template>
  <div class="bgff p20">
    <el-form :inline="true" :model="formInline" class="demo-form-inline mb20">
      <!-- <el-form-item>
                <el-button type="primary" icon="el-icon-plus" @click="redirect">添加模板</el-button>
      </el-form-item>-->
    </el-form>
    <div>
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column
          type="index"
          width="50"
          :index="(index)=>{return (index+1) + (curPage - 1) * size }"
          label="序号"
        ></el-table-column>
        <el-table-column prop="name" label="消息类型" min-width="120"></el-table-column>
        <el-table-column prop="content" label="消息内容" min-width="150"></el-table-column>
        <el-table-column prop="date" label="创建时间" min-width="150"></el-table-column>
        <!-- <el-table-column fixed="right" label="操作" width="150">
                    <template slot-scope="scope">
                        <el-button type="text" size="small">禁用</el-button>
                    </template>
        </el-table-column>-->
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  name: "adduser",
  data() {
    return {
      curPage: 1,
      size: 10,
      fileList: [],
      formLabelWidth: "100px",
      dialogFormVisible: false,
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      formInline: {
        input: ""
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "通知模板",
          content: `【安心电管家】安心电管家系统检测到您的终端“{设备名称}”的"{危害类型}",请及时整改！（该条信息来自“{发送用户部门+名称}”）`,
          zip: 200333
        }
      ]
    };
  },
  methods: {
    handleClick(row) {
      console.log(row);
    },
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
      console.log(file);
    },
    redirect() {
      window.open(
        "https://mp.weixin.qq.com/wxopen/tmplmsg?action=public_list&token=104441976&lang=zh_CN"
      );
    }
  }
};
</script>

<style lang="scss" scoped>
</style>
